/*
 * @Author: JoeLiao
 * @Date: 2024-11-03 20:53:06
 * @LastEditors: JoeLiao 1094153928@qq.com
 * @LastEditTime: 2024-11-03 23:09:35
 * @FilePath: \vue3_admin_master\src\router\index.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
// @see: https://router.vuejs.org/zh/guide/

// 通过vue-router插件实现模板路由配置
import { createRouter, createWebHistory } from 'vue-router'
import { constantRoute } from './routes'

// 创建路由器
const router = createRouter({
  // 路由模式
  history: createWebHistory(),
  routes: constantRoute,
  //滚动行为
  scrollBehavior() {
    return {
      left: 0,
      top: 0,
    }
  },
})

export default router
